var $topplaces 	= $('#topplace'),
	$newfeeds 	=  $('#newfeed'),
	$foodcategories = $('#foodcategories'),
	$newplaces 	= $('#newplacecontainer'),
	$change = $("#contents"),
	topplaces 	= null,
	topplaceListView	= null,
	newfeeds 	= null,
	newfeedListView 	= null,
	foodcategories	= null,
	foodcateListView = null,
	newplaces = null,
	newplaceListView = null;

Router = Backbone.Router.extend({
	routes: {
        "":                 "home",
		"user/:id" : "userdetail"
    },
	initialize: function () {
		
		this.$content = $("#contents");
    },

    home: function () {
		console.log($change);
		topplaces = new TopPlaceCollection();
		topplaces.fetch({success: function() {
				topplaceListView = new TopPlaceList({
					collection: topplaces,
					el: $topplaces
				});
				topplaceListView.render();
				reSizeHeigh();
		}});
		newfeeds = new FeedCollection();
		newfeeds.fetch({success: function() {
				newfeedListView = new FeedList({
					collection: newfeeds,
					el: $newfeeds
				});
				newfeedListView.render();
				reSizeHeigh();
		}});

		foodcategories	= new FoodCateCollection();
		foodcategories.fetch({success: function() {
				foodcateListView = new FoodCateList({
					collection: foodcategories,
					el: $foodcategories
				});
				foodcateListView.render();
				reSizeHeigh();
		}});
        
		newplaces = new NewPlaceCollection();
		newplaces.fetch({success: function() {
			newplaceListView = new NewPlaceList({
				collection: newplaces,
				el: $newplaces
			});
			newplaceListView.render();
			reSizeHeigh();
		}})
    },
	userdetail:function(){
		console.log("user page");
		
	}
});


    router = new Router();
    Backbone.history.start();
